/********************************************************************************
 *      Copyright:  (C) 2022 lijiale<244871365@qq.com>
 *                  All rights reserved.
 *
 *       Filename:  bc28_at.h
 *    Description:  This head file 
 *
 *        Version:  1.0.0(19/01/22)
 *         Author:  lijiale <24487136365@qq.com>
 *      ChangeLog:  1, Release initial version on "19/01/22 11:15:38"
 *                 
 ********************************************************************************/

#ifndef __BC28_AT_H__
#define __BC28_AT_H__

#include "comport.h"

#define MAX_NFRMTN_T 256

typedef struct nbiot_hwinfo_s {
    char     manufacturer[MAX_NFRMTN_T];//制造商
    char     modules_name[MAX_NFRMTN_T];//模块名
    char     num[MAX_NFRMTN_T];//产品序列号
    char     imei[MAX_NFRMTN_T];
    char     cimi[MAX_NFRMTN_T];
    char     version[MAX_NFRMTN_T];
}nbiot_hwinfo_t;

int atcmd_at(comport_t *comport);  //查询是否连接成功
int atcmd_csq(comport_t *comport);  //查询信号强度
int atcmd_cereg(comport_t *comport); //查询网络注册状态
int atcmd_cgatt(comport_t *comport); //查询网络是否被激活（附着上基站
int atcmd_cgatt1(comport_t *comport); //触发网络连接
int atcmd_cgpaddr(comport_t *comport); //查询模块的IP地址
int atcmd_ncdp(comport_t *comport , char *ip , char *port); //设置IOT平台的ip和端口
int atcmd_cgsn(comport_t *comport , char *imei , int size); //查询设备唯一标识码
int atcmd_cimi(comport_t *comport , char *cimi , int size); //查询国际移动用户标识码
int atcmd_cgmm(comport_t *comport , char *nmae , int size); //请求厂商模型标识
int atcmd_cgmr(comport_t *comport , char *version , int size); //请求厂商软件版本
int atcmd_ati(comport_t *comport , nbiot_hwinfo_t *ctx); //显示产品ID
int atcmd_qlwuladtaex(comport_t *comport, int temp); //上报数据
int atcmd_set_echo(comport_t *comport,int flag); //设置回显
int atcmd_cfun(comport_t *comport , int swtch); //开关射频
 
#endif
